﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ModuleBase
{
    public class M1Point
    {
        public int IOIndex { get; set; }
        public bool OnOff { get; set; }
        public double Delay { get; set; }
        public double X { get; set; }
        public double Y { get; set; }
        public double Z { get; set; }
        public double MidX { get; set; }
        public double MidY { get; set; }
        public double MidZ { get; set; }
        public double Radius { get; set; }
        public int CircleDir { get; set; }
        public double Speed { get; set; }
        public double Acc { get; set; }
        public ushort Type { get; set; }
    }

    public class MPoint
    {
        public double X { get; set; }
        public double Y { get; set; }
        public double Z { get; set; }
        public double R { get; set; }
    }
    public class XYZPoint : MPoint
    {
        [Key]
        public int Id { get; set; }
        public string? Name { get; set; }
        public string? Alias { get; set; }
        public int Hand { get; set; }
        public int PcsOrder { get; set; }
        public double X1 { get; set; }
        public double Y1 { get; set; }
        public bool IsUse { get; set; }
        public double H { get; set; }
        public int ProductIndex { get; set; }
    }

    public class FlyGrabPoint : MPoint
    {
        [Key]
        public int Id { get; set; }
        public int PcsOrder { get; set; }
        public int Hand { get; set; }
        public int Track { get; set; }//飞拍次序
        public int Kind { get; set; }//0:定点拍照 1:飞拍 2:飞拍路径
        public bool UseLight1 { get; set; }//使用光源1
        public bool UseLight2 { get; set; }//使用光源2
    }
    public class VisionPoint
    {
        public int Id { get; set; }
        public string? Name { get; set; }
        public int Hand { get; set; }//区分左右手
        public int PcsOrder { get; set; }//穴位
        public double Rec1Row1 { get; set; }//识别区域
        public double Rec1Column1 { get; set; }//识别区域
        public double Rec1Row2 { get; set; }//识别区域
        public double Rec1Column2 { get; set; }//识别区域
        public int ModelKind { get; set; }//第几种模板
        public int Track { get; set; }//
        public int ImageKind { get; set; }//0:单拍 1：飞拍
        public int CameraHand { get; set; }//左相机或右相机
        public int ImagePcsOrder { get; set; }//图片索引号
        public double ST_X { get; set; }//基准位置X
        public double ST_Y { get; set; }//基准位置Y
        public double ST_Angle { get; set; }//基准位置角度
        public string ScriptFileName { get; set; }//脚本名称
        public double Target_X { get; set; }//图像上的焊接位置
        public double Target_Y { get; set; }
    }
    public class VisionScript
    {
        public int Id { get; set; }
        public bool IsUse { get; set; }
        public int PointId { get; set; }//焊点Id
        public string ScriptFileName { get; set; }//选用视觉程序的名称
        public int PcsOrder { get; set; }//执行顺序
    }
}
